<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*, javax.servlet.*, javax.servlet.http.*" %>
<%@ page import="cn.edu.lingnan.pojo.ProjectAdult " %>
<%@ page import="cn.edu.lingnan.pojo.Project" %>
<%@ page import="cn.edu.lingnan.pojo.User" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>进行中项目</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }
        table, th, td {
            border: 1px solid black;
        }
        th, td {
            padding: 10px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
        button {
            background-color: #f44336;
            color: white;
            border: none;
            padding: 10px;
            cursor: pointer;
            border-radius: 5px;
        }
        button:hover {
            background-color: #d32f2f;
        }
    </style>

</head>
<body>
<h1>进行中项目</h1>
<table>
    <tr>
        <th>项目ID</th>
        <th>项目名称</th>
        <th>导师ID</th>
        <th>导师姓名</th>
<%--        <th>学生姓名</th>--%>
        <th>类型</th>
        <th>开始时间</th>
        <th>结束时间</th>
        <th>描述</th>
        <th>成员</th>

    </tr>
    <%


        List<Project> projects = (List<Project>) session.getAttribute("enteredProject");

        if (projects != null) {
            for (Project project : projects) {
    %>
    <tr>
        <td><%= project.getProtectId() %></td>
        <td><%= project.getProjectName() %></td>
        <td><%= project.getPostId() %></td>
        <td><%= project.getPostName() %></td>
<%--        <td><%= project.getStudentName() %></td>--%>
        <td><%= project.getType() %></td>
        <td><%= project.getStartTime() %></td>
        <td><%= project.getEndTime() %></td>
        <td><%= project.getDescription() %></td>
        <td><%= project.getMembers() %></td>

    </tr>
    <%
            }
        }
    %>
</table>
</body>
</html>
